package com.kova.api.cipher;


import com.kova.api.crypto.AesCrypto;
import com.kova.api.crypto.Crypto;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RRCryptoConfig {

    /**
     * 加解密key配置
     */
    @Value("${api.keySecret}")
    private String api_key;

    /**
     * 加密解密方式使用一样的
     */
    @Bean("rrCrypto")
    public Crypto rrCrypto(){
        return new AesCrypto(api_key);
    }
}

